Focus detection apparatus and control method thereof

ABSTRACT

A focus detection apparatus that measures, in advance, and stores shading coefficients for light sources of different types, and in a focus detection operation, generates light source information for determining a light source that irradiates an object based on outputs from a plurality of photometry sensors with different spectral characteristics and switches the shading coefficient of a focus detection sensor among shading coefficients stored according to the light source information.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the improvement of focus detectionaccuracy under light sources of different types in an auto-focus camera.

2. Description of the Related Art

Film/digital single lens reflex cameras commonly use a so-called TTL(Through The Lens) phase difference detection-type focus detection(hereinafter also referred to as AF) method in which a light flux passedthrough a photographing lens is split by a beam splitter, images of therespective light fluxes are formed on a focus detection sensor by twoimaging lens with displaced optical axes, a defocus amount is calculatedfrom a displacement between the two formed images, and focusing isachieved by driving the photographing lens according to the calculateddefocus amount.

FIG. 14 illustrates an example of a phase difference detection-typefocus detection apparatus that uses a secondary imaging system. In theapparatus, a field lens 102 that shares the same optical axis as aphotographing lens 101 that performs focus detection is disposed in thevicinity of a predicted imaging plane F of the photographing lens 101.Two secondary imaging lenses 103 a and 103 b are placed side by sidebehind the photographing lens 101 and the field lens 102. Furthermore,light receiving sensors 104 a and 104 b are disposed behind thesecondary imaging lenses 103 a and 103 b. The field lens 102 forms twodifferent exit pupils 101 a and 101 b of the photographing lens 101 onpupil planes of the two secondary imaging lenses 103 a and 103 b.

Consequently, light fluxes from an object surface S respectivelyentering the secondary imaging lens 103 a and 103 b become light fluxesoutput from equal-area regions of the exit pupils 101 a and 101 b of thephotographing lens 101 which correspond to the respective secondaryimaging lenses 103 a and 103 b and which do not overlap each other.

As described above, the received light amount distributions of the lightfluxes from the equal-area exit pupils 101 a and 101 b on sensors 104 aand 104 b are ideally uniform. However, since a simple lens structure isrequired in consideration of a permissible size, cost, and convenienceof production of the focus detection apparatus, lens aberration becomesrelatively large. Consequently, the imaging relationship between pupilsof the secondary imaging lenses 103 a and 103 b and the pupils 101 a and101 b of the photographing lens 101 becomes incomplete, thereby causinga nonuniformity in the light amount or, in other words, causing shadingsuch as that illustrated in FIG. 15 to remain on the sensors 104 a and104 b.

A focus detection apparatus arranged so as to remove a difference inlight amount distribution between sensors 104 a and 104 b with respectto an object surface of uniform brightness to obtain the same lightamount distribution is disclosed in Japanese Patent ApplicationLaid-Open No. S60-101514. The invention described in the patent documentcompensates shading by assigning a weight coefficient to an amplitude ofa photoelectric conversion output signal of a sensor according topositions of respective pixels on the sensor.

However, with the focus detection apparatus disclosed in Japanese PatentApplication Laid-Open No. S60-101514 described above, depending on thetype of light source illuminating an object, there may be cases whereshading between sensors cannot be compensated.

When the focus detection apparatus disclosed in Japanese PatentApplication Laid-Open No. S60-101514 is applied to a single lens reflexcamera, a semi-transparent optical member 105 (main mirror) such as abeam splitter is disposed between the photographing lens 101 and thefield lens 102 as illustrated in FIG. 16. The main mirror 105 isprovided in order to split a light flux having passed through thephotographing lens 101 at a predetermined ratio to a focus detectionoptical system and a finder optical system.

The characteristics of dependency on angle of incidence of a spectrumtransmittance of the main mirror 105 are illustrated in FIG. 17.Approximately 40% of light with a wavelength of 600 nm or less istransmitted to the focus detection optical system. On the other hand,40% or more of light of 600 nm or greater is transmitted to the focusdetection optical system. The rate of transmittance gradually increasesas the wavelength increases.

This is due to the spectrum transmittance of the main mirror 5configured such that more near infrared light is transmitted. Thischaracteristic is a result of a photoelectric conversion element as aauto-focusing sensor is sensitive to wavelengths up to around 1100 nmand performs focusing operations even at low brightness, and when afocusing operation cannot be performed under low brightness, anear-infrared (around 700 nm) light is irradiated by a light emittingdiode from a camera to an object.

Meanwhile, a human eye is most sensitive to light ranging from around450 to 650 nm. Light whose wavelength does not fall into this frequencyrange is not particularly important to a finder optical system from theperspective of color reproducibility.

Here, it should be noted that with respect to the optical configurationof the main mirror 105, the spectrum transmittance of the main mirror105 is angle-dependent. In particular, with long-wavelength light of 600nm or greater, transmittance varies according to the angle of incidenceof a light beam.

The angles of incidence of light fluxes from the exit pupils 101 a and101 b of the photographing lens 101 when being transmitted through themain mirror 105 differ from each other. Furthermore, the angles ofincidence of light fluxes received at positions of respective pixels ofthe sensors 104 a and 104 b when being transmitted through the mainmirror 105 also differ from each other. Therefore, shading of thesensors 104 a and 104 b varies depending on whether or not a lightsource irradiating the object includes a long-wavelength component.

FIG. 18 is a diagram illustrating spectral sensitivities of lightsources, where the abscissa represents wavelength and the ordinaterepresents relative energy. In the diagram, a fluorescent light isdenoted by F, a flood lamp is denoted by L, and a fill light describedearlier is denoted by A.

The diagram illustrates that compared to components with longerwavelengths than 620 nm being almost absent among the wavelengthcomponents of the fluorescent light, with the flood lamp, the longer thewavelength, the stronger the relative sensitivity.

FIGS. 19A to 21B illustrate examples of shading waveforms andcompensated waveforms of sensors in light sources of various types.

A shading waveform under a fluorescent light is illustrated in FIG. 19A.A result of compensation by performing an operation using an optimalcompensation coefficient on the shading waveform of FIG. 19A isillustrated in FIG. 19B. In addition, a shading waveform under a floodlamp is illustrated in FIG. 20A. Since the angle of incidence of thelight flux from the exit pupil 101 a to the main mirror 105 is smallerthan the angle of incidence of the light flux from the exit pupil 101 b,the transmittance of near infrared light is high. Therefore, in FIG.20A, the sensor 104 a is shown obtaining a greater light amount than thesensor 104 b. In addition, when taking cell positions of sensors intoconsideration, the further up on the sensor, the smaller the angle ofincidence of a light flux to the main mirror. Therefore, the upper sideof the sensor obtains a greater light amount than the lower side.

FIG. 20B illustrates a result of compensation performed on the shadingwaveform illustrated in FIG. 20A using the compensation coefficientcomputed from the shading waveform illustrated in FIG. 19A. Asillustrated in FIG. 20A, uncompensated regions remain when thecompensated waveform is not uniform.

In addition, a shading waveform under a fill light is illustrated inFIG. 21A. Since the fill light is near infrared light, the angulardependence of shading has increased as compared to FIG. 20A. FIG. 21Billustrates a result of compensation performed on the shading waveformillustrated in FIG. 21A using the compensation coefficient computed fromthe shading waveform illustrated in FIG. 19B. FIG. 21B shows that theremaining uncompensated region is even greater than in FIG. 20B.

As shown, depending on the type of light source irradiating an object,an uncompensated region of shading remains between sensors, causing areduction in the detection accuracy of a displacement between twoimages.

SUMMARY OF THE INVENTION

It is an aspect of the invention to provide, in a TTL auto-focus camera,an auto-focus camera system with a high focus detection accuracy whichdoes not cause focal point displacement under light sources of differenttypes. In order to achieve the object, according to the presentinvention, a focus detection apparatus includes: a focus detectionsensor that detects an image signal of an object based on a light fluxobtained from an object light transmitted through a photographing lens;a first photometry sensor that measures a visible light region; a secondphotometry sensor that measures a region whose wavelength is longer thanthe visible light region; and a compensation unit that compensates theimage signal from the focus detection sensor based on outputs from thefirst and second photometry sensors.

As described above, according to the present invention, since a type ofa light source irradiating an object can be determined using an outputsignal from a photometry sensor and an image signal output by a focusdetection sensor can be compensated based on the determination result,focus detection accuracy can be improved even during photographyperformed under object-irradiating light sources of different types.

In addition, with a compensation operation method according to thepresent invention, since the operation method only requires compensationcoefficients corresponding to two types of light sources, the capacityof a memory for storing data required to perform operations can bereduced.

Furthermore, with another compensation operation method according to thepresent invention, since the operation method only requires acompensation coefficient corresponding to one light source type, thecapacity of the memory for storing data required to perform operationscan be further reduced.

Moreover, with yet another compensation operation method according tothe present invention, since the operation method uses a rate of nearinfrared light in a light flux from an object, a compensationcoefficient under fluorescent light (visible light), and a coefficientof an angle of incidence of the light flux to an optical member, focusdetection with high accuracy can be achieved with respect to lightsources of different types.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a configuration diagram illustrating an auto-focus camerasystem according to an exemplary embodiment of the present invention;

FIG. 2 is a circuit configuration diagram illustrating an auto-focuscamera system according to an exemplary embodiment of the presentinvention;

FIG. 3 is a diagram illustrating spectral characteristics of first andsecond photometry sensors;

FIG. 4 is a diagram illustrating a detailed configuration of an opticalsystem related to focus detection;

FIG. 5 is a diagram illustrating a line arrangement of a focus detectionsensor;

FIG. 6 is a diagram illustrating an AF field arrangement of a focusdetection sensor;

FIG. 7 is a diagram illustrating a flow chart of a shading coefficientmeasurement and a storing operation according to an exemplary embodimentof the present invention;

FIG. 8 is a diagram illustrating a shading waveform obtained by a linesensor 211;

FIG. 9 is a diagram illustrating a flow chart of an AF operationperformed by a camera mounted with a focus detection apparatus accordingto a first exemplary embodiment of the present invention;

FIG. 10 is a diagram illustrating a flow chart of a photographingoperation by a camera mounted with a focus detection apparatus accordingto a first embodiment of the present invention;

FIG. 11 is a diagram illustrating a flow chart of an AF operation usinga camera mounted with a focus detection apparatus according to a secondembodiment of the present invention;

FIG. 12 is a diagram illustrating a flow chart of an AF operation usinga camera mounted with a focus detection apparatus according to a thirdembodiment of the present invention;

FIG. 13 is a diagram illustrating a relationship between angles ofincidence to a main mirror and shading angular coefficients;

FIG. 14 is a diagram illustrating an optical system of a phasedifference detection-type focus detection apparatus using a secondaryimaging system;

FIG. 15 is a diagram illustrating shading of sensors 104 a and 104 b;

FIG. 16 is a diagram illustrating an optical system of a focus detectionapparatus of a single lens reflex camera;

FIG. 17 is a diagram illustrating a dependency on angle of incidence ofa spectrum transmittance of a main mirror;

FIG. 18 is a diagram illustrating spectral sensitivities of variouslight source types;

FIGS. 19A and 19B are diagrams respectively illustrating shadingwaveforms under fluorescent light;

FIGS. 20A and 20B are diagrams respectively illustrating shadingwaveforms under a flood lamp; and

FIGS. 21A and 21B are diagrams respectively illustrating shadingwaveforms under fill light.

DESCRIPTION OF THE EMBODIMENTS

Preferred embodiments of the present invention will now be described indetail in accordance with the accompanying drawings.

<First Embodiment>

FIG. 1 is a configuration diagram illustrating an auto-focus camerasystem according to an exemplary embodiment of the present invention andwhich includes a single lens reflex camera and an interchangeable lensto be mounted on the camera. The diagram primarily illustrates anoptical positional relationship of the system.

In the diagram, a photographing lens 11 is mounted on a front face of acamera main body 1. Optical parts, mechanical parts, an electriccircuit, and a film or an imaging element such as a CCD are housed inthe camera main body 1 so as to enable photography of a picture or animage. An optical member 2 that is a main mirror (hereinafter referredto as an optical member) is obliquely provided in a photographingoptical path in a finder observation state and is withdrawn from thephotographing optical path in a photographing state. In addition, theoptical member 2 is arranged as a semi-transparent mirror that partiallytransmits or reflects an incident light and has the spectrumtransmittance characteristics illustrated in FIG. 17 when obliquelypositioned in the photographing optical path.

A focus plate 3 is disposed on a predicted imaging plane of lenses 12 to14, to be described later, and makes up a finder optical system. A pentaprism 4 is provided for changing finder optical paths. A photographercan observe a photographing screen by observing the focus plate 3 via aneyepiece 5. A first imaging lens 6 and a first photometry sensor 7, aswell as a second imaging lens and a second photometry sensor 31, areprovided for measuring an object brightness in the finder observationscreen. An optical filter 32 shields long wavelength light and anoptical filter 33 shields visible light.

Also provided are a focal plane shutter 8 and an imaging element 9. Asub mirror 25 is obliquely provided in the photographing optical path ina finder observation state and is withdrawn from the photographingoptical path in a photographing state together with the optical member2. The sub mirror 25 bends downward a light beam transmitted through theobliquely-placed optical member 2, and forms an image on a focusdetection sensor 201 via a field mask 26, a field lens 27, an iris 28,and a secondary imaging lens 29. An in-focus state can be detected byprocessing an image signal obtained by photoelectrically converting theimage.

A mount contact group 10 becomes a communication interface between thecamera main body 1 and the photographing lens 11. Among lenses 12 to 14,a first group lens (hereinafter referred to as focusing lens) 12 adjustsan in-focus position of a photographing screen by moving back and forthon an optical axis, a second group lens 13 varies a focal length of thephotographing lens 11 and magnifies the photographing screen by movingback and forth on an optical axis, and a third group lens 14 is fixed.Also provided is an iris 15. A focus drive motor moves the focusing lens12 back and forth in the direction of the optical axis during automaticfocal adjustment operations. An iris drive motor 17 varies an aperturediameter of the iris 15. A sliding movement of a brush 19 fixed to thefocusing lens 12 causes a distance encoder 18 to read a position of thefocusing lens 12 and generate a signal corresponding to an objectdistance.

Next, a circuit configuration of the aforementioned camera system willbe described with reference to FIG. 2. Components shared by FIG. 1 aredenoted using the same reference characters. First, a circuitconfiguration inside the camera main body 1 will be described.

Connected to the camera microcomputer 100 are the focus detection sensor201, the first photometry sensor 7, the second photometry sensor 31, ashutter control circuit 107, a motor control circuit 108, and a liquidcrystal display circuit 111. In addition, the camera microcomputer 100performs signal transmission to/from a lens microcomputer 50 disposed inthe photographing lens 11 via the mount contact 10. Furthermore, thecamera microcomputer 100 incorporates a shading compensation operationcircuit 113 that performs compensation operations on shading of pixelsignals obtained by the focus detection sensor 201, and a memory 112 forstoring shading coefficients.

The focus detection sensor 201 performs accumulation control ofphotoelectrically converted signals according to a signal from thecamera microcomputer 100 and outputs a pixel signal to the cameramicrocomputer 100. The camera microcomputer 100 performs an A/Dconversion on the pixel signal to obtain an image signal. Shadingcompensation is performed on the image signal (before compensation) bythe shading compensation operation circuit 113 based on a shadingcoefficient stored in advance in the memory 112 and on light sourceinformation, to be described later, so as to eliminate a difference inlight amount distribution between pixels of the focus detection sensor201. A focal adjustment state is detected from the compensated imagesignal by a phase difference detection method. Focal adjustment controlof the photographing lens is performed by exchanging signals with thelens microcomputer 50.

The shutter control circuit 107 performs conduction control on a shutterfront blade drive magnet MG-1 and a shutter rear blade drive magnet MG-2which make up the focal plane shutter 8 according to a signal from thecamera microcomputer 100 to drive the shutter front blade and theshutter rear blade and perform an exposure operation. The motor controlcircuit 108 moves the optical member 2 up and down and performs shuttercharging by controlling a motor M according to a signal from the cameramicrocomputer 100.

A switch SW1 is switched on by a first stroke (half depression) of arelease button, not shown, to initiate photometry and AF (automaticfocal adjustment). A switch SW2 is switched on by a second stroke (fulldepression) of the release button to initiate shutter driving or, inother words, an exposure operation. The camera microcomputer 100 readsstate signals of the respective switches including the switches SW1 andSW2, as well as an ISO sensitivity setting switch, an iris settingswitch, and a shutter speed setting switch, which are operating membersnot shown. The liquid crystal display circuit 111 controls a displayunit of finder 24 and an external display unit 42 according to a signalfrom the camera microcomputer 100.

Next, an internal electric circuit configuration of the photographinglens 11 will be described. The camera main body 1 and the photographinglens 11 are mutually electrically connected via the lens mount contact10. The lens mount contact 10 is made up of: a contact L0 that is apower supply contact of the focus drive motor 16 and the iris drivemotor 17 in the photographing lens 11; a power supply contact L1 of thelens microcomputer 50; a clock contact L2 for performing serial datacommunication; a contact L3 for data transmission from the camera mainbody to the photographing lens 11; a contact L4 for data transmissionfrom the photographing lens 11 to the camera main body 1; a motor groundcontact L5 for a motor power supply; and a ground contact L6 for a powersupply of the lens microcomputer 50.

The lens microcomputer 50 is connected to the camera microcomputer 100via the lens mount contact 10 and operates the focus drive motor 16 thatdrives the focusing lens 12 and the iris drive motor 17 that drives theiris 15 according to a signal from the camera microcomputer 100 tocontrol focal adjustment and the aperture of the photographing lens 11.A pulse board 51 and a light detector 52 enable the lens microcomputer50 to count the number of pulses so as to obtain positional informationof the focusing lens 12 during focal adjustment (focusing operation).Accordingly, focal adjustment of the photographing lens 11 can beperformed. Positional information of the focusing lens 12 read from theaforementioned distance encoder 18 is input to the lens microcomputer 50to be converted to object distance information and transmitted to thecamera microcomputer 100.

As described above, operations of the camera system according to thepresent invention and illustrated in FIG. 2 is controlled by the cameramicrocomputer 100. As will be described later, the control is executedaccording to flow charts illustrated in any of FIGS. 7, 9, 10, and 11,and is realized by executing a program read from the memory as will beunderstood by those skilled in the art.

Next, spectral characteristics of the first and second photometrysensors will be described with reference to FIG. 3.

In the diagram, spectral sensitivity characteristics of the first andsecond photometry sensors and 31 are denoted by A, spectral sensitivitycharacteristics of an optical filter 32 disposed in front of the firstphotometry sensor 7 are denoted by B, and spectral sensitivitycharacteristics of an optical filter 33 disposed in front of the secondphotometry sensor 31 are denoted by C. Therefore, the first photometrysensor detects light in the visible light region whose dependency onangle of incidence of spectrum transmittance at the main mirror isrelatively low. On the other hand, the second photometry sensor candetect light in a long-wavelength region (near infrared and larger)whose dependency on angle of incidence of spectrum transmittance at theoptical member 2 is relatively high. A ratio between the visible lightregion and the long-wavelength region becomes light source information.

Next, the focus detection sensor 201 will be described in detail usingFIGS. 4 to 6. FIG. 4 is a diagram illustrating a detailed configurationof an optical system related to focus detection. A light flux obtainedfrom an object light from an object irradiated by a light source istransmitted through the photographing lens 11 and reflected by the submirror 25, and forms an image in the vicinity of the field mask 26 thatexists on a plane conjugated to the imaging plane. FIG. 4 illustrates,in a developed format, an optical path folded by a plurality of mirrorsafter being reflected by the sub mirror 25. The field mask 26 is amember for shielding excess light in regions of the screen other thanthe focus detection region.

The field lens 27 functions to form images of the respective openings ofthe iris 28 in the vicinity of the exit pupil of the photographing lens11. The secondary imaging lens 29 is disposed behind the iris 28 and ismade up of two lenses forming a pair. The lenses respectively correspondto openings of the iris 28. Light fluxes having passed through the fieldmask 26, the field lens 27, the iris 28, and the secondary imaging lens29 form images on a line sensor on the focus detection sensor 201.

FIG. 5 is a diagram illustrating line sensor locations in the focusdetection sensor 201. Line sensors 211 a, 211 b, 212 a, and 212 b arearranged in the focus detection sensor 201 in pairs of two so as to forma plurality of line sensor pairs.

FIG. 6 is a diagram illustrating a positional relationship of focusdetection regions on an object in a photographing screen. A verticalfield 220 that is a focus detection region performs focus detectionaccording to a phase difference of image signals from the line sensorpair 211 a and 211 b. A horizontal field 222 that is a focus detectionregion performs focus detection according to a phase difference of imagesignals from the line sensor pair 212 a and 212 b.

Next, a shading coefficient measurement operation of the focus detectionsensor 201 in the camera system configured as described above will bedescribed with reference to the flow chart illustrated in FIG. 7.

Before initiating a shading coefficient measurement operation, an objectsurface of the camera main body 1 is set under a light having afluorescent light wavelength in a state of uniform brightness.

The operation starts at step S101 upon receiving a shading coefficientmeasurement request from a communication tool, not shown, connected tothe camera microcomputer. In this case, the camera microcomputer 100performs an accumulation operation of the line sensors 211 a, 211 b, 212a, and 212 b in the focus detection sensor 201. After accumulation isstarted, an accumulation status is monitored according to a signal fromthe focus detection sensor 201. Accumulation is suspended onceaccumulated signals reach a predetermined amount.

In following step S102, a read operation of accumulated image signals isperformed by requesting the focus detection sensor 201 to output animage signal. According to a predetermined drive pulse transmitted fromthe camera microcomputer 100, the focus detection sensor 201 outputsrespective image signals in a sequence of line sensors 211 a→211 b→212a→212 b as pixel signals. The camera microcomputer 100 reads an imagesignal by sequentially subjecting the pixel signals to A/D conversion.In step S103, a shading coefficient is computed from the image signalobtained in step S102 and is stored in the memory 112. The shadingcoefficient measurement operation under a fluorescent light is herebyconcluded.

A shading coefficient operation method will now be described withreference to FIG. 8. FIG. 8 illustrates image signals accumulated at theline sensors 211 a and 211 b. Let Vs(n) denote an nth pixel signal andWc(n) denote an nth shading coefficient. In addition, if a maximum pixelsignal searched from the image signals is denoted by Vp, then a shadingcoefficient can be determined from the following equation.Wc(n)=Vp/Vs(n)

Assuming that an nth compensated signal is denoted by Vo(n), then Vo(n)can be determined from the following equation.Vo(n)=Vs(n)×Wc(n)

Consequently, a nonuniform image signal such as shown in FIG. 8 can becompensated to a uniform signal based on Vp.

In addition, while the operation represented by the flow chartillustrated in FIG. 7 is a measurement operation under a fluorescentlight, by switching light sources, shading coefficients with respect toa flood lamp and a fill light illustrated in FIG. 18 can be measured andstored in the same manner as the operation illustrated in FIG. 7. Inthis case, a shading coefficient according to a flood lamp light is tobe denoted by Wf and a shading coefficient according to a fill light isto be denoted by Wir(n).

Next, an auto-focusing operation of the camera according to the firstembodiment will be described with reference to the flow chartillustrated in FIG. 9. Operation starts at step S201 when the switch SW1on the camera main body 1 illustrated in FIG. 2 is pressed. In thiscase, the camera microcomputer 100 performs an accumulation operation ofthe line sensors 211 a, 211 b, 212 a, and 212 b in the focus detectionsensor 201. After accumulation is started, an accumulation status ismonitored according to a signal from the focus detection sensor 201.Accumulation is suspended once accumulated signals reach a predeterminedamount.

In following step S202, a read operation of accumulated image signals isperformed by requesting the focus detection sensor 201 to output animage signal. According to a predetermined drive pulse transmitted fromthe camera microcomputer 100, the focus detection sensor 201 outputsrespective image signals in a sequence of line sensors 211 a→211 b→212a→212 b as pixel signals. The camera microcomputer 100 reads an imagesignal by sequentially subjecting the pixel signals to A/D conversion.

In next step S203, photometric values of the first photometry sensor 7and the second photometry sensor 31 are read (photometry step).

In following step S204, a light source is determined from a ratiobetween photometric values of the first photometry sensor 7 and thesecond photometry sensor 31 read in step S203, and light sourceinformation representing the determination result is generated (lightsource information generation unit). In this case, the light sourcedetermination result is classified into three types. Assuming that thephotometric value obtained by the first photometry sensor 7 is denotedby Bc and the photometric value obtained by the second photometry sensor31 is denoted by Bir, if0.7<Bc/(Bc+Bir)≦1.0,then the light source illuminating the object is determined to be afluorescent light-type light source and the flow proceeds to step S205.In addition, if0.4<Bc/(Bc+Bir)≦0.7,then the light source illuminating the object is determined to be aflood lamp-type light source and the flow proceeds to step 5206.Furthermore, if0≦Bc/(Bc+Bir)≦0.4,then the light source illuminating the object is determined to be an AFfill light-type light source and the flow proceeds to step S207.

In step S205, a compensated pixel signal Vo(n) is computed using ashading coefficient Wc(n) under fluorescent light stored in advance inthe memory 112 on the pixel signal Vs(n) obtained in step S202 by theshading compensation operation circuit 113. Assuming that an nthcompensated signal is denoted by Vo(n), then Vo(n) can be determinedfrom the following equation.Vo(n)=Vs(n)×Wc(n)

In step S206, a compensated pixel signal Vo(n) is computed using ashading coefficient Wf(n) under a flood lamp stored in advance in thememory 112 on the pixel signal Vs(n) obtained in step S202 by theshading compensation operation circuit 113. Assuming that an nthcompensated signal is denoted by Vo(n), then Vo(n) can be determinedfrom the following equation.Vo(n)=Vs(n)×Wf(n)

In step S207, a compensated pixel signal Vo(n) is computed using ashading coefficient Wir(n) under an AF fill light stored in advance inthe memory 112 on the pixel signal Vs(n) obtained in step S202 by theshading compensation operation circuit 113. Assuming that an nthcompensated signal is denoted by Vo(n), then Vo(n) can be determinedfrom the following equation.Vo(n)=Vs(n)×Wir(n)

In step S208, a defocus amount is computed by a known method from adisplacement between two images of image signals subjected to shadingcompensation in step S205, step S206, or step S207.

In following step S209, a determination of in-focus is made if thedefocus amount is within a desired range such as (1/4)Fδ (where Fdenotes a lens aperture value, δ denotes a constant of 20 μm and, assuch, a leased iris of an F2.0 lens takes a value of 10 μm) and theauto-focusing operation is concluded. If the defocus amount is greaterthan (1/4)Fδ, in step S210, the defocus amount is transmitted to thelens microcomputer 50 via serial communication lines LCK, LDO, and LDIto instruct lens driving. Upon receiving the instruction, the lensmicrocomputer 50 determines a drive direction of the focus drive motor16 according to the received defocus amount and drives the focus drivemotor according to the instructed defocus amount. The flow returns tostep S201 to repeat the operations described above until an in-focusstate is achieved.

In next step S211, a determination is made on a release start switchSW2. If the release start switch SW2 is turned on, the flow proceeds tostep S301 that is continued in FIG. 10, and if turned off, the AFprocess is concluded.

Next, an operation during release will be described with reference toFIG. 10. When the auto-focusing operation described above is concludedand the release start switch SW2 illustrated in FIG. 2 is turned on, instep S301, the camera microcomputer 100 obtains an object brightness BVfrom a photometric value of the first photometry sensor 7 that measuresvisible light, obtains an exposure value EV by adding the objectbrightness BV to a set ISO sensitivity SV, and calculates an aperturevalue AV and a shutter speed TV using a known method.

In next step S302, the optical member 2 is flipped up and withdrawn fromthe photographing optical path. At the same time, the cameramicrocomputer 100 instructs the lens microcomputer 50 to stop down theiris to the aperture value AV determined in step S202, and the lensmicrocomputer 50 receives the instruction. Subsequently, once theoptical member 2 is completely withdrawn from the photographing opticalpath, in step s303, the camera microcomputer 100 energizes the shutterfront blade drive magnet MG-1 and starts an opening operation of thefocal plane shutter 8.

After the lapse of a predetermined shutter opening period, the flowproceeds to S304 where the camera microcomputer 100 energizes theshutter rear blade drive magnet MG-2, closes the rear blade of the focalplane shutter 8 to end exposure and to move the optical member 2 down instep S305, and concludes photography.

As described above, a camera according to the first exemplary embodimentof the present invention is arranged such that when performing shadingcompensation on a pixel signal obtained by a focus detection sensor, alight source illuminating an object is determined by a light sourcedetection sensor and compensation is carried out using the optimumshading coefficient among shading coefficients under a plurality oflight sources which have been measured and stored in advance (operationsof step S204 to step S207). Consequently, the accuracy of focusdetection can be improved.

Operational expressions and compensation formulas of shadingcoefficients are not limited to those described above and otheroperational expressions may be used instead.

Similarly, thresholds for light source determination are not limited tothose described above and other thresholds may be used instead.

Furthermore, according to the description heretofore provided, shadingcoefficients are respectively measured and stored under various lightsource types for the line sensors 211 a, 211 b, 212 a, and 212 b.However, since light fluxes with respect to the horizontal lines 212 aand 212 b have very similar angles of incidence to the optical member(for example, the difference between angles of incidence is equal to orless than a predetermined amount) and light source dependence of shadingis minimal, measurement and storage operations can be performed under asingle light source. In this case, compensation may be performed using ashading coefficient under a single light source regardless of the lightsource determination result.

<Second Embodiment>

In the first embodiment, compensation is performed by selecting,according to a light source determination result, any one of a pluralityof shading coefficients stored in advance.

The second embodiment described below is an exemplary embodiment thatperforms a compensation operation that differs from the firstembodiment.

FIG. 11 is a flow chart for describing an auto-focusing operation of acamera related to the second embodiment of the present invention. Acontrol flow illustrated in FIG. 11 will be described with reference toFIG. 14 described earlier.

Operation starts at step S401 when the switch SW1 on the camera mainbody 1 illustrated in FIG. 2 is pressed. In this case, the cameramicrocomputer 100 performs an accumulation operation of the line sensors211 a, 211 b, 212 a, and 212 b in the focus detection sensor 201. Afteraccumulation is started, an accumulation status is monitored accordingto a signal from the focus detection sensor 201. Accumulation issuspended once accumulated signals reach a predetermined amount.

In following step S402, a read operation of accumulated image signals isperformed by requesting the focus detection sensor 201 to output animage signal. According to a predetermined drive pulse transmitted fromthe camera microcomputer 100, the focus detection sensor 201 outputsrespective image signals in a sequence of line sensors 211 a→211 b→212a→212 b as pixel signals. The camera microcomputer 100 reads an imagesignal by sequentially subjecting the pixel signals to A/D conversion.

In next step S403, photometric values of the first photometry sensor 7and the second photometry sensor 31 are read.

In following step S404, light source coefficients are computed from aratio between photometric values of the first photometry sensor 7 andthe second photometry sensor read in step S403. In this case, acoefficient Kc (first coefficient) representing the proportion ofvisible light and a coefficient Kir (second coefficient) representingthe proportion of near infrared light among spectral components of thelight source are computed according to the following equations. In thefollowing equation, a photometric value obtained by the first photometrysensor 7 is denoted by Bc and the photometric value obtained by thesecond photometry sensor 31 is denoted by Bir.Kc=Bc/(Bc+Bir)Kir=Bir/(Bc+Bir)

In next step S405, a compensated pixel signal Vo(n) is computed withrespect to the pixel signal Vs(n), obtained in step S402 by the shadingcompensation operation circuit 113, according to the following equationusing a shading coefficient Wc(n) under fluorescent light and a shadingcoefficient Wir under an AF fill light stored in advance and lightsource coefficients Kc and Kir computed in step S404.Vo(n)=Vs(n)×{(Kc×Wc(n))+(Kir×Wir(n))}.

In step S406, a defocus amount is computed by a known method from adisplacement between two images of an image signal subjected to shadingcompensation in step S405.

In following step S407, a determination of in-focus is made if thedefocus amount is within a desired range such as (1/4)Fδ (where Fdenotes a lens aperture value, δ denotes a constant of 20 μm and, assuch, a leased iris of an F2.0 lens takes a value of 10 μm) and theauto-focusing operation is concluded. If the defocus amount is greaterthan (1/4)Fδ, in step S408, the defocus amount is transmitted to thelens microcomputer 50 via serial communication lines LCK, LDO, and LDIto instruct lens driving. Upon receiving the instruction, the lensmicrocomputer 50 determines a drive direction of the focus drive motor16 according to the received defocus amount and drives the focus drivemotor according to the instructed defocus amount. Subsequently, the flowreturns to step S401 to repeat the operations described above until anin-focus state is achieved.

In next step S409, a determination is made on a release start switchSW2. If the release start switch SW2 is turned on, the flow proceeds tostep S301 that is continued in FIG. 10, and if turned off, the AFprocess is concluded. Since FIG. 10 illustrates the same cameraoperation as the first exemplary embodiment, a description thereof willbe omitted.

As described above, a camera according to the second exemplaryembodiment of the present invention is arranged such that whenperforming shading compensation on a pixel signal obtained by a focusdetection sensor, a coefficient Kc representing the proportion ofvisible light and a coefficient Kir representing the proportion of nearinfrared light of a light source are computed as light sourceinformation by a light source detection sensor (operations of step S403and step S404). In addition, by using light source coefficients Kc andKir for weighting of a shading coefficient We under a fluorescent light(visible light) and a shading coefficient under an AF fill light (nearinfrared light) stored in advance, appropriate shading coefficients canbe computed even under light source of different types (the operation ofstep S405). In other words, the accuracy of focus detection can beimproved according to the use of light sources of different types.

Furthermore, since a shading compensation operation can be performed aslong as shading coefficients corresponding to two light source types areavailable, a memory capacity necessary for storage can be reduced.

Moreover, operational expressions and compensation formulas of shadingcoefficients are not limited to those described above and otheroperational expressions may be used instead.

<Third Embodiment>

Cameras according to the first embodiment and the second embodimentperform compensation based on light source detection results and aplurality of shading coefficients stored in advance.

The third embodiment described below is an exemplary embodiment thatperforms a compensation operation that differs from the first embodimentand the second embodiment.

FIG. 12 is a flow chart for describing an auto-focusing operation of acamera related to the third embodiment of the present invention. Acontrol flow illustrated in FIG. 12 will be described with reference toFIG. 14 described earlier.

Operation starts at step S501 when the switch SW1 on the camera mainbody 1 illustrated in FIG. 2 is pressed. In this case, the cameramicrocomputer 100 performs an accumulation operation of the line sensors211 a, 211 b, 212 a, and 212 b in the focus detection sensor 201. Afteraccumulation is started, an accumulation status is monitored accordingto a signal from the focus detection sensor 201. Accumulation issuspended once accumulated signals reach a predetermined amount.

In following step S502, a read operation of accumulated image signals isperformed by requesting the focus detection sensor 201 to output animage signal. According to a predetermined drive pulse transmitted fromthe camera microcomputer 100, the focus detection sensor 201 outputsrespective image signals in a sequence of line sensors 211 a→211 b→212a→212 b as pixel signals. The camera microcomputer 100 reads an imagesignal by sequentially subjecting the pixel signals to A/D conversion.

In next step S503, photometric values of the first photometry sensor 7and the second photometry sensor 31 are read.

In following step S504, light source coefficients are computed from aratio between photometric values of the first photometry sensor 7 andthe second photometry sensor 31 read in step S503. In this case, aproportion of near infrared light denoted by Kir is computed using thefollowing equation. In the equation, a photometric value obtained by thefirst photometry sensor 7 is denoted by Bc and a photometric valueobtained by the second photometry sensor 31 is denoted by Bir.Kir=Bir/(Bc+Bir)

In next step S505, a compensated pixel signal Vo(n) is computed withrespect to the pixel signal Vs(n), obtained in step S502 by the shadingcompensation operation circuit 113, according to the following equationusing a shading coefficient Wc(n) under fluorescent light stored inadvance, a light source coefficient Kir computed in step S504, and anangle of incidence coefficient a(θ) of the optical member.Vo(n)=Vs(n)×{Wc(n)+(a(θ)×Kir)}

In this case, the angle of incidence coefficient a(θ) of the opticalmember numerically represents a rate of change of the angle of incidenceand shading when a light flux (near infrared light) enters an opticalmember. An example is illustrated in FIG. 13.

Since the angle of incidence differs for each pixel, when performingshading compensation, a compensation operation is performed using acoefficient a(θ) corresponding to the angle of incidence of thecompensated pixel.

In step S506, a defocus amount is computed by a known method from adisplacement between two images of an image signal subjected to shadingcompensation in step S505.

In next step S507, a determination of in-focus is made if the defocusamount is within a desired range such as (1/4)Fδ (where F denotes a lensaperture value, δ denotes a constant of 20 μm and, as such, a leasediris of an F2.0 lens takes a value of 10 μm) and the auto-focusingoperation is concluded. If the defocus amount is greater than (1/4)Fδ,in step S508, the defocus amount is transmitted to the lensmicrocomputer 50 via serial communication lines LCK, LDO, and LDI toinstruct lens driving. Upon receiving the instruction, the lensmicrocomputer 50 determines a drive direction of the focus drive motor16 according to the received defocus amount and drives the focus drivemotor according to the instructed defocus amount. Subsequently, the flowreturns to step S501 to repeat the operations described above until anin-focus state is achieved.

In next step S509, a determination is made on a release start switchSW2. If the release start switch SW2 is turned on, the flow proceeds tostep S301 that is continued in FIG. 10, and if turned off, the AFprocess is concluded. Since FIG. 10 illustrates the same cameraoperation as the first exemplary embodiment, a description thereof willbe omitted.

As described above, a camera according to the third exemplary embodimentof the present invention is arranged such that when performing shadingcompensation on a pixel signal obtained by a focus detection sensor, acoefficient Kir representing the proportion of near infrared light iscomputed by a light source detection sensor (operations of step S503 andstep S504). In addition, by using a shading coefficient We under afluorescent light (visible light) and an angle of incidence coefficienta(θ) of the optical member stored in advance, appropriate shadingcoefficients can be computed even under light source of different types(the operation of step S505). In other words, the accuracy of focusdetection can be improved even when light sources of different types areused.

Furthermore, since a shading compensation operation can be performed aslong as a coefficient corresponding to a single light source type isavailable, a memory capacity necessary for storage can be furtherreduced. Needless to say, operational expressions and compensationformulas of shading coefficients are not limited to those describedabove and other operational expressions may be used instead.

It is to be understood that the exemplary embodiments described aboveare merely specific examples of implementing the present invention andare not intended to limit the technical scope of the present inventionin any way. In other words, various changes and modifications may bemade without departing from the technical ideas or primary features ofthe present invention.

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiments, and by a method, the steps of whichare performed by a computer of a system or apparatus by, for example,reading out and executing a program recorded on a memory device toperform the functions of the above-described embodiments. For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2009-118592, filed May 15, 2009, which is hereby incorporated byreference herein in its entirety.

1. A focus detection apparatus comprising: a focus detection sensor thatdetects an image signal of an object based on a light flux obtained froman object light transmitted through a photographing lens; a firstphotometry sensor that measures a visible light; a second photometrysensor that measures a light whose wavelength is longer than the visiblelight; and a compensation unit that compensates the image signal fromthe focus detection sensor based on outputs from the first and secondphotometry sensors, wherein the compensation unit performs weighting onthe image signal from the focus detection sensor according to theposition of each pixel so as to eliminate a difference between lightamount distributions among respective pixels of the focus detectionsensor which is caused by a light flux from a plane with uniformbrightness of the object.
 2. The focus detection apparatus according toclaim 1, further comprising a storage unit that stores a weightcoefficient for weighting for each type of light source that illuminatesthe object, wherein the weight coefficient is generated by measuring, inadvance, a difference in light amount distributions that is createdbetween respective pixels of the focus detection sensor by a light fluxfrom a plane with a uniform brightness of the object irradiated by lightsources of a plurality of types so as to eliminate the difference, lightsource information indicating a light source type is generated based onoutputs from the first and second photometry sensors, and thecompensation unit compensates an image signal from the focus detectionsensor based on a weight coefficient corresponding to a light sourcetype determined by the light source information.
 3. The focus detectionapparatus according to claim 1, further comprising a storage unit thatstores a first coefficient corresponding to the visible light and asecond coefficient corresponding to the light whose wavelength is longerthan the visible light measured in advance, wherein the compensationunit generates a weight coefficient from light source informationindicating a light source type generated based on outputs from the firstand second photometry sensors and on the first and second coefficients,and compensates an image signal from the focus detection sensor based onthe generated weight coefficient.
 4. The focus detection apparatusaccording to claim 1, further comprising an optical member disposedbetween the photographing lens and the focus detection sensor, whereinthe optical member reflects or transmits a part of a light flux obtainedfrom an object light transmitted through the photographing lens, thecompensation unit generates a weight coefficient based on light sourceinformation indicating a light source type generated based on outputsfrom the first and second photometry sensors and on an angle ofincidence of a light flux corresponding to each pixel when entering theoptical member, and compensates an image signal from the focus detectionsensor based on the generated weight coefficient.
 5. The focus detectionapparatus according to claim 1, further comprising an optical memberdisposed between the photographing lens and the focus detection sensor,wherein the optical member reflects or transmits a part of a light fluxobtained from an object light transmitted through the photographinglens, the focus detection sensor includes a plurality of pairs of linesensors arranged in different directions, and when a difference betweenangles of incidence of light fluxes entering line sensors forming a pairamong the plurality of pairs of line sensors when entering the opticalmember is equal to or smaller than a predetermined amount, thecompensation unit does not use outputs from the first and secondphotometry sensors when compensating an image signal from the linesensors.
 6. A control method of a focus detection apparatus comprising:detecting an image signal of an object based on a light flux obtainedfrom an object light transmitted through a photographing lens using afocus detection sensor; measuring a visible light using a firstphotometry sensor; measuring a light whose wavelength is longer than thevisible light using a second photometry sensor; and compensating theimage signal from the focus detection sensor based on outputs ofmeasurements respectively performed using the first and secondphotometry sensors, wherein the compensating the image signal comprisesperforming weighting on the image signal from the focus detection sensoraccording to the position of each pixel so as to eliminate a differencebetween light amount distributions among respective pixels of the focusdetection sensor which is caused by a light flux from a plane withuniform brightness of the object.